-
Notifications
You must be signed in to change notification settings - Fork 0
fix(recipes): improve Add Recipe form #52
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey! Here are some suggestions for improvements, with a mix of my own and AI's thoughts.
Changes I think should be made
-
Crop can be skipped by closing the dialog (
RecipeCreatePage.tsx:337–362)
If I select an image and then close/cancel the crop dialog, the original image is still selected. This means the 3:2 crop can basically be skipped. I think the image should only be committed when clicking Use image, or the preview should be cleared/restored when cancelling. -
The cropped image is only used for the preview (
RecipeCreatePage.tsx:53–84, 350–362)
The crop result is stored as an object URL, but the file input still contains the original file. So once uploading is connected, it looks like the original uncropped image would be uploaded. Would probably be better to keep the croppedBlob/Filein state as the actual selected image.
Improvements
-
Ingredient rows are hard to distinguish on smaller screens
On mobile, the ingredient fields kind of blend together, so it's difficult to see where one ingredient ends and the next starts. Some extra spacing, a divider, or another form of visual grouping between ingredients would help a lot. -
The crop dialog scrollbar is really small
The scrollbar on the right side of the crop dialog is pretty hard to grab/use, especially on a smaller screen. Could be nice to make this a bit more accessible/easier to interact with. -
Ingredient errors are attached to the Name field (
RecipeCreatePage.tsx:782–825)
If e.g. Amount is missing/invalid, the error is shown under Name, and Amount isn't marked as invalid. It would be nicer to have field-specific errors forname,amount, andunit, so it's clear which value actually needs fixing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The recipe ingredients could still be more clearly seperated on a smaller screen, but looks good to merge.
* fix(recipes): improve Add Recipe form * chore(Add Recipe): run formating and checks for CI * fix(recipes): refine Add Recipe image and ingredient handling
…delivery docsDev –> Main) (#55) feat: improve local development, recipe creation, authentication and delivery docs * Added Docker for local development * fix(recipes): improve Add Recipe form ([#52](#52)) * improve Add Recipe form * refine image and ingredient handling * feat(auth): share validation and improve authentication handling ([#53](#53)) * docs: add second delivery progress summary ([#54](#54)) * add second delivery progress summary Co-authored-by: Ole Stangeland <olestan@stud.ntnu.no> Co-authored-by: Hasan Mohammad Fawzi <hasanmo@stud.ntnu.no> Co-authored-by: Hasan Mohammad Fawzi <hasan.fawzi@hoglund.no>
Fix the following issues:
Closes #50